package com.jwaoo.mobile.view.setting.fragment;

import android.view.View;
import com.dx.as.ToolBarOptions;
import com.dx.as.common.FragmentUtils;
import com.dx.as.fragment.TFragment;
import com.jwaoo.mobile.R;
/**
 * Created by jwaoo on 2017/12/15.
 */

public class SettingFragment extends TFragment{
    @Override
    public void initView() {
        findView(R.id.setting_user).setOnClickListener(onClickListener);
        findView(R.id.setting_account).setOnClickListener(onClickListener);
        findView(R.id.setting_message).setOnClickListener(onClickListener);
        findView(R.id.setting_fuction).setOnClickListener(onClickListener);
        findView(R.id.setting_cache).setOnClickListener(onClickListener);
        findView(R.id.setting_feedback).setOnClickListener(onClickListener);
        findView(R.id.setting_about).setOnClickListener(onClickListener);
        findView(R.id.setting_quit).setOnClickListener(onClickListener);
    }

    @Override
    public int setLayoutI() {
        return R.layout.fragment_setting;
    }

    @Override
    public void dataOpion() {

    }

    @Override
    public void initRpo() {

    }

    @Override
    protected void setToolbar() {
        super.setToolbar();
        ToolBarOptions toolBarOptions = new ToolBarOptions();
        toolBarOptions.showLeft=true;
        toolBarOptions.titleString = getResources().getString(R.string.setting);
        setToolBar(toolBarOptions);
    }

    private View.OnClickListener onClickListener = new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            switch (view.getId()){
                case R.id.setting_user:
                    break;
                case R.id.setting_account:
                    break;
                case R.id.setting_message:
                    FragmentUtils.goToFragment(getActivity(),MessageFragment.class,R.id.register_container);
                    break;
                case R.id.setting_fuction:
                    FragmentUtils.goToFragment(getActivity(),FuctionFragment.class,R.id.register_container);
                    break;
                case R.id.setting_cache:
                    break;
                case R.id.setting_feedback:
                    FragmentUtils.goToFragment(getActivity(),FeedbackFragment.class,R.id.register_container);
                    break;
                case R.id.setting_about:
                    FragmentUtils.goToFragment(getActivity(),AboutFragment.class,R.id.register_container);
                    break;
                case R.id.setting_quit:

                    break;
            }
        }

    };

}
